package com.boco.raptor.subsystem.attempx.dto;


import com.boco.transnms.common.dto.base.*;

public  class ProActivityConst extends GenericDO {
    public static final String CLASS_NAME="PRO_ACTIVITY_CONST";

    public static class AttrName{
        public static final String processId = "PROCESS_ID";
        public static final String activityId = "ACTIVITY_ID";
        public static final String processKey = "PROCESS_KEY";
        public static final String packageId = "PACKAGE_ID";
        public static final String callbackClassName = "CALLBACK_CLASS_NAME";
        public static final String labelCn = "LABEL_CN";
        public static final String roleId = "ROLE_ID";
        public static final String xtype = "XTYPE";
        public static final String isChildAct = "IS_CHILD_ACT";
    }

    public ProActivityConst() {
        this.setClassName("PRO_ACTIVITY_CONST");
        this.initDefaultValue();
    }

    public ProActivityConst(String cuid) {
        this.setClassName("PRO_ACTIVITY_CONST");
        this.setCuid(cuid);
        this.initDefaultValue();
    }

    private void initDefaultValue() {
    }


    public void setProcessId(String varProcessId) {
        this.setAttrValue(AttrName.processId,varProcessId);
        this.removeDefaultAttrValue(AttrName.processId);
    }

    public String getProcessId() {
        return this.getAttrString(AttrName.processId);
    }

    public void setActivityId(String varActivityId) {
        this.setAttrValue(AttrName.activityId,varActivityId);
        this.removeDefaultAttrValue(AttrName.activityId);
    }

    public String getActivityId() {
        return this.getAttrString(AttrName.activityId);
    }

    public void setProcessKey(String varProcessKey) {
        this.setAttrValue(AttrName.processKey,varProcessKey);
        this.removeDefaultAttrValue(AttrName.processKey);
    }

    public String getProcessKey() {
        return this.getAttrString(AttrName.processKey);
    }

    public void setPackageId(String varPackageId) {
        this.setAttrValue(AttrName.packageId,varPackageId);
        this.removeDefaultAttrValue(AttrName.packageId);
    }

    public String getPackageId() {
        return this.getAttrString(AttrName.packageId);
    }

    public void setCallbackClassName(String varCallbackClassName) {
        this.setAttrValue(AttrName.callbackClassName,varCallbackClassName);
        this.removeDefaultAttrValue(AttrName.callbackClassName);
    }

    public String getCallbackClassName() {
        return this.getAttrString(AttrName.callbackClassName);
    }

    public void setLabelCn(String varLabelCn) {
        this.setAttrValue(AttrName.labelCn,varLabelCn);
        this.removeDefaultAttrValue(AttrName.labelCn);
    }

    public String getLabelCn() {
        return this.getAttrString(AttrName.labelCn);
    }

    public void setRoleId(String varRoleId) {
        this.setAttrValue(AttrName.roleId,varRoleId);
        this.removeDefaultAttrValue(AttrName.roleId);
    }

    public String getRoleId() {
        return this.getAttrString(AttrName.roleId);
    }

    public void setXtype(String varXtype) {
        this.setAttrValue(AttrName.xtype,varXtype);
        this.removeDefaultAttrValue(AttrName.xtype);
    }

    public String getXtype() {
        return this.getAttrString(AttrName.xtype);
    }

    public void setIsChildAct(boolean varIsSubActivity) {
        this.setAttrValue(AttrName.isChildAct,varIsSubActivity);
        this.removeDefaultAttrValue(AttrName.isChildAct);
    }

    public boolean getIsChildAct() {
        return this.getAttrBool(AttrName.isChildAct,false);
    }
    public Class getAttrType(String attrName){
        return ProActivityConstHelper.getInstance().getAttrType(attrName);
    }

    public String[] getAllAttrNames(){
        return ProActivityConstHelper.getInstance().getAllAttrNames();
    }

    public String[] getAllUserAttrNames(){
        return ProActivityConstHelper.getInstance().getAllUserAttrNames();
    }

    public String getAttrLabelCn(String attrName){
        return ProActivityConstHelper.getInstance().getAttrLabelCn(attrName);
    }

    private static class ProActivityConstHelper  extends AbstractDoHelper{
        private static final ProActivityConstHelper instance  = new ProActivityConstHelper();

        private ProActivityConstHelper(){
            super(false);
        }

        public static ProActivityConstHelper getInstance(){
            return instance;
        }

        public static String  getDboClassName(){
            return "PRO_ACTIVITY_CONST";
        }

        protected void putAttrTypes(){
            putAttrType("PROCESS_ID", String.class);
            putAttrType("ACTIVITY_ID", String.class);
            putAttrType("PROCESS_KEY", String.class);
            putAttrType("PACKAGE_ID", String.class);
            putAttrType("CALLBACK_CLASS_NAME", String.class);
            putAttrType("LABEL_CN", String.class);
            putAttrType("ROLE_ID", String.class);
            putAttrType("XTYPE", String.class);
            putAttrType("IS_CHILD_ACT", boolean.class);
        }

        protected void putAttrNames(){
            putAttrLabelCn("PROCESS_ID", "PROCESS_ID");
            putAttrLabelCn("ACTIVITY_ID", "ACTIVITY_ID");
            putAttrLabelCn("PROCESS_KEY", "PROCESS_KEY");
            putAttrLabelCn("PACKAGE_ID", "PACKAGE_ID");
            putAttrLabelCn("CALLBACK_CLASS_NAME", "CALLBACK_CLASS_NAME");
            putAttrLabelCn("LABEL_CN", "LABEL_CN");
            putAttrLabelCn("ROLE_ID", "ROLE_ID");
            putAttrLabelCn("XTYPE", "XTYPE");
            putAttrLabelCn("IS_CHILD_ACT", "IS_CHILD_ACT");
        }
    }
}
